Towards Verifying Java Realizations of Ocl-constrained Design Models Using Jml
نویسنده
چکیده
The Object Constraint Language OCL is a formal textual notation that could be used for placing constraints on the modelling elements that occur in UML diagrams. Constraints include invariants on classes and types, and preconditions and postconditions of operations. OCL was designed to be used in conjunctions with UML diagrams resulting in more precise object-oriented designs. The Java Modelling Language (JML) is a behavioural interface specification language designed for specifying Java classes and interfaces. This paper applies OCL for developing Java realizations of UML design models where JML is used as the assertion language. This is achieved by translating a subset of OCL assertions into JML assertions. In order to verify a Java subsystem with respect to a design subsystem with OCL constraints, an appropriate realization relation is defined and the approach is illustrated by an example.
منابع مشابه
A Hoare Calculus for Verifying Java Realizations of OCL-Constrained Design Models
The Object Constraint Language OCL offers a formal notation for constraining the modelling elements occurring in UML diagrams. In this paper we apply OCL for developing Java realizations of UML design models and introduce a new Hoare-Calculus for Java classes which uses OCL as assertion language. The Hoare rules are as usual for while programs, blocks and (possibly recursive) method calls. Upda...
متن کاملA Library-Based Approach to Translating OCL Constraints to JML Assertions for Runtime Checking
OCL is a formal notation to specify constraints on UML models that cannot otherwise be expressed by diagrammatic notations such as class diagrams. Using OCL one can document detailed design decisions and choices along with the behavior, e.g., class invariants and method pre and postconditions. However, OCL constraints cannot be directly executed and checked at runtime by an implementation, thus...
متن کاملPractical Application of a Translation Tool from UML/OCL to Java Skeleton with JML Annotation
In recent years, MDA techniques have been strongly developed. Thus, translation techniques such as UML to some program languages have gained a lot of attention. Translation techniques such as OCL to JML have been also researched. OCL is a language to describe detail properties of UML and standardized by OMG, while, JML is a language to specify properties of Java program. Both OCL and JML are ba...
متن کاملSpecifying JAVA CARD API in OCL
We discuss the development of an OCL specification for the JAVACARD API. The main purpose of this specification is to support and aid the verification of JAVA CARD programs in the KeY system. The main goal of the KeY system is to integrate object oriented design and formal methods. The already existing specification written in JML (JAVA Modelling Language) has been used as a starting point for ...
متن کاملJAG: JML Annotation Generation for Verifying Temporal Properties
We present a tool for verifying temporal properties on Java/ JML classes by generating automatically JML annotations that ensure the verification of the temporal properties.
متن کامل